<template>
  <dl v-for="(item,index) in messageList" :key="index" @click="gotoDetail(item.id)">
    <dd>
      <img src="@/assets/img/icon/icon-message.png" />
      <span></span>
    </dd>
    <dt>
      <h3>北京驻场无忧科技有限公司<span>5分钟前</span></h3>
      <p>您好，我们这招聘vue233带的饭实打实两大类就是飞机啊手机佛菩萨</p>
    </dt>

  </dl>
</template>

<script setup lang="ts">
import { useRouter } from "vue-router";
// 接收父组件的参数
const props = defineProps({
  messageList: {
    type: Array,
    default: () => [],
  },
});
const router = useRouter();
const gotoDetail = (id: Number) => {
  router.push("/message/talk/" + id);
};
</script>
<style scoped>
dl{
  font-size: .64rem;
  color: #666;
  padding: .9rem 0;
  margin: 0 .6rem;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
}
dl dd{
  position: relative;
  margin-right: .56rem;
}
dl dd img{
  width: 2.61rem;
  height: 2.61rem;
}
dl dd span{
  position: absolute;
  top: 0;
  right: 0;
  width: .32rem;
  height: .32rem;
  background: #ff0000;
  border-radius: 50%;
}
dl dt{
  
}
dl dt h3{
  font-size: .8rem;
  line-height: .8rem;
  font-weight: 500;
  color: #333;
  margin-bottom: .43rem;
}
dl dt h3 span{
  float: right;
  color: #999;
  font-size: .64rem;
  font-weight: 100;
}
dl dt p{
  font-size: .69rem;
  line-height: .69rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
</style>